package com.sqx.modules.labelType.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.labelType.entity.LabelType;
import com.sqx.modules.labelType.service.LabelTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 分类标签-用户端
 * @author wuChang
 * @since 2024-05-29
 */
@RestController
@Api(value = "分类标签-用户端", tags = {"分类标签-用户端"})
@RequestMapping("/app/labelType/")
public class AppLabelTypeController {
    @Autowired
    private LabelTypeService labelTypeService;

    /**
     * 获取分类标签列表
     * @param labelType 分类标签
     */
    @ApiOperation("获取分类标签列表")
    @GetMapping(value = "getLabelTypeList")
    public Result getLabelTypeList(@ApiParam("页码") Integer page,
                                   @ApiParam("条数")Integer limit,
                                   @ApiParam("分类标签")LabelType labelType) {
        labelType.setIsEnable(1);
        return Result.success().put("data", labelTypeService.getLabelTypeList(page, limit, labelType));
    }


}